tools/libxl: Split libxl__domain_create_state.restore_fd in two
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 12 Jun 2015 20:12:40 +0000 (21:12 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Wed, 15 Jul 2015 10:22:53 +0000 (11:22 +0100)
commited8d3c56aaad09d0a4273deed08290d9660b3994
tree43bf5b73ad7757c4835ab383f57187cc79a4d27c
parent321d636e182a1dc5e49b63cae7476bba8f6cc8e7
tools/libxl: Split libxl__domain_create_state.restore_fd in two

In a future patch, we shall support automatically converting a legacy
stream to a v2 stream, in which case libxc needs to read from a
different fd.

Simply overwriting restore_fd does not work; the two fd's have
different circumstances.  The restore_fd needs to be returned to its
original state before libxl_domain_create_restore() returns, while in
the converted case, the fd needs allocating and deallocating
appropriately.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Wei Liu <wei.liu2@citrix.com>
---
New in v2
tools/libxl/libxl_create.c
tools/libxl/libxl_internal.h
tools/libxl/libxl_save_callout.c